{% extends "base.html" %}

{% block title %}知了平台-首页{% endblock %}

{% block head %}
    <link rel="stylesheet" href="{{ url_for('static',filename='css/index.css') }}">
{% endblock %}

{% block body %}
    <div class="row" style="margin-top: 20px;">
            <div class="col"></div>
            <div class="col-10">
                <ul class="question-ul">
                    {% for question in questions %}
                    <li>
                        <div class="side-question">
                            <img class="side-question-avatar" src="{{ url_for('static',filename='images/avatar.jpg') }}" alt="">
{#                            <img class="side-question-avatar" src="./static/images/avatar.jpg" alt="">#}
                        </div>
                        <div class="question-main">
                            <div class="question-title"><a href="{{ url_for('qa.qa_detail',qa_id=question.id) }}">{{ question.title }}</a></div>
                            <div class="question-content">{{ question.content }}</div>
                            <div class="question-detail">
                                <span class="question-author">{{ question.author.username }}</span>
                                <span class="question-time">{{ question.create_time }}</span>
                            </div>
                        </div>
                    </li>
                    {% endfor %}
                </ul>
            </div>
            <div class="col"></div>
        </div>
{% endblock %}



{#<!DOCTYPE html>#}
{#<html>#}
{##}
{#<head>#}
{#    <meta charset="utf-8">#}
{#    <meta name="viewport" content="width=device-width, initial-scale=1">#}
{#    <link rel="stylesheet" href="{{ url_for('static',filename='bootstrap/bootstrap.4.6.min.css') }}">#}
{#    <link rel="stylesheet" href="{{ url_for('static',filename='css/init.css') }}">#}
{#    <link rel="stylesheet" href="{{ url_for('static',filename='css/index.css') }}">#}
{#    <link rel="stylesheet" href="./static/css/index.css">#}
{#    <title>知了问答平台-首页</title>#}
{#</head>#}
{##}
{#<body>#}
{#    <nav class="navbar navbar-expand-lg navbar-light bg-light">#}
{#        <div class="container">#}
{#            <a class="navbar-brand" href="#">知了问答</a>#}
{#            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">#}
{#                <span class="navbar-toggler-icon"></span>#}
{#            </button>#}
{#            <div class="collapse navbar-collapse" id="navbarSupportedContent">#}
{#                <ul class="navbar-nav mr-auto">#}
{#                    <li class="nav-item active">#}
{#                        <a class="nav-link" href="/">首页 <span class="sr-only">(current)</span></a>#}
{#                    </li>#}
{#                    <li class="nav-item">#}
{#                        <a class="nav-link" href="#">发布问答</a>#}
{#                    </li>#}
{#                    <li class="nav-item ml-2">#}
{#                        <form class="form-inline my-2 my-lg-0" method="GET" action="#">#}
{#                            <input class="form-control mr-sm-2" type="search" placeholder="关键字" aria-label="Search" name="q">#}
{#                            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">搜索</button>#}
{#                        </form>#}
{#                    </li>#}
{#                </ul>#}
{#                <ul class="navbar-nav">#}
{#                    <li class="nav-item">#}
{#                        <a class="nav-link" href="#">登录</a>#}
{#                    </li>#}
{#                    <li class="nav-item">#}
{#                        <a class="nav-link" href="#">注册</a>#}
{#                    </li>#}
{#                </ul>#}
{#            </div>#}
{#        </div>#}
{#    </nav>#}
{#    <div class="container">#}
{#        <div class="row" style="margin-top: 20px;">#}
{#            <div class="col"></div>#}
{#            <div class="col-10">#}
{#                <ul class="question-ul">#}
{#                    <li>#}
{#                        <div class="side-question">#}
{#                            <img class="side-question-avatar" src="./static/images/avatar.jpg" alt="">#}
{#                        </div>#}
{#                        <div class="question-main">#}
{#                            <div class="question-title"><a href="#">钢铁侠是怎样炼成的</a></div>#}
{#                            <div class="question-content">传奇钢铁侠的成长之路</div>#}
{#                            <div class="question-detail">#}
{#                                <span class="question-author">托尼史塔克</span>#}
{#                                <span class="question-time">2022年12月1日</span>#}
{#                            </div>#}
{#                        </div>#}
{#                    </li>#}
{#                </ul>#}
{#            </div>#}
{#            <div class="col"></div>#}
{#        </div>#}
{#    </div>#}
{#</body>#}
{##}
{#</html>#}